package com.ruoyi.etp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.etp.mapper.EtpEmployeeDevicesMapper;
import com.ruoyi.etp.domain.EtpEmployeeDevices;
import com.ruoyi.etp.service.IEtpEmployeeDevicesService;

/**
 * 设备管理Service业务层处理
 * 
 * @author xmj
 * @date 2025-09-12
 */
@Service
public class EtpEmployeeDevicesServiceImpl implements IEtpEmployeeDevicesService 
{
    @Autowired
    private EtpEmployeeDevicesMapper etpEmployeeDevicesMapper;

    /**
     * 查询设备管理
     * 
     * @param id 设备管理主键
     * @return 设备管理
     */
    @Override
    public EtpEmployeeDevices selectEtpEmployeeDevicesById(Long id)
    {
        return etpEmployeeDevicesMapper.selectEtpEmployeeDevicesById(id);
    }

    /**
     * 查询设备管理列表
     * 
     * @param etpEmployeeDevices 设备管理
     * @return 设备管理
     */
    @Override
    public List<EtpEmployeeDevices> selectEtpEmployeeDevicesList(EtpEmployeeDevices etpEmployeeDevices)
    {
        return etpEmployeeDevicesMapper.selectEtpEmployeeDevicesList(etpEmployeeDevices);
    }

    /**
     * 新增设备管理
     * 
     * @param etpEmployeeDevices 设备管理
     * @return 结果
     */
    @Override
    public int insertEtpEmployeeDevices(EtpEmployeeDevices etpEmployeeDevices)
    {
        return etpEmployeeDevicesMapper.insertEtpEmployeeDevices(etpEmployeeDevices);
    }

    /**
     * 修改设备管理
     * 
     * @param etpEmployeeDevices 设备管理
     * @return 结果
     */
    @Override
    public int updateEtpEmployeeDevices(EtpEmployeeDevices etpEmployeeDevices)
    {
        etpEmployeeDevices.setUpdateTime(DateUtils.getNowDate());
        return etpEmployeeDevicesMapper.updateEtpEmployeeDevices(etpEmployeeDevices);
    }

    /**
     * 批量删除设备管理
     * 
     * @param ids 需要删除的设备管理主键
     * @return 结果
     */
    @Override
    public int deleteEtpEmployeeDevicesByIds(Long[] ids)
    {
        return etpEmployeeDevicesMapper.deleteEtpEmployeeDevicesByIds(ids);
    }

    /**
     * 删除设备管理信息
     * 
     * @param id 设备管理主键
     * @return 结果
     */
    @Override
    public int deleteEtpEmployeeDevicesById(Long id)
    {
        return etpEmployeeDevicesMapper.deleteEtpEmployeeDevicesById(id);
    }
}
